package deibay.client.core;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import deibay.client.AdvertiseController;
import deibay.client.IModel;
import deibay.client.core.views.IViewAdvertise;
import deibay.messages.SendAdvertiseMsg;

public class DeibayAdvertiseController extends AdvertiseController{

	public DeibayAdvertiseController(IViewAdvertise view, IModel model) {
		super(view, model);
	}

	@Override
	public void createViewEvents() {
		view.setMessageAction(new ActionListener(){

			public void actionPerformed(ActionEvent arg0) {
				SendAdvertiseMsg message = new SendAdvertiseMsg(view.sendMessage());
				model.sendMessage(message);
				view.close();
			}			
		});
	}

	@Override
	public void initView() {		
		
	}

}
